@{
    Layout=null;
}
@using MvcDemo.Models;
@model Student;
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <div>
            <table>
                @if (Model!=null)
                {
                    <tr hidden>
                <td>id：</td>
                <td><input type="text" name="id" value="@Model.id"></td>
            </tr>
            <tr>
                <td>姓名：</td>
                <td><input type="text" name="name" value="@Model.Name"></td>
            </tr>
            <tr>
                <td>班级：</td>
                <td><input type="text" name="classname" value="@Model.classname"></td>
            </tr>
            <tr>
                <td>年龄：</td>
                <td><input type="text" name="age" value="@Model.age"></td>
            </tr>
            <tr>
                <td><input type="button" value="保存" id="save"></td>
                <td><input type="button" value="取消" id="quxiao"></td>
            </tr>
                }else
                {
                    <tr hidden>
                <td>id：</td>
                <td><input type="text" name="id"></td>
            </tr>
            <tr>
                <td>姓名：</td>
                <td><input type="text" name="name"></td>
            </tr>
            <tr>
                <td>班级：</td>
                <td><input type="text" name="classname"></td>
            </tr>
            <tr>
                <td>年龄：</td>
                <td><input type="text" name="age"></td>
            </tr>
            <tr>
                <td><input type="button" value="保存" id="save"></td>
                <td><input type="button" value="取消" id="quxiao"></td>
            </tr>
                }
            
        </table>
        </div>
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="~/js/js.js"></script>
</body>
</html>